//连接数据库
const mongoose = require('mongoose');
const config = require('../config/config');

mongoose.connect(config.dbUrl, (err)=>{
  if(err){
    console.log(err);
    return;
  }
  console.log('MyCMS数据库连接成功');
});

module.exports = mongoose;